public class ComponentLeaf  extends Component {
    public ComponentLeaf(String componentName) {
        super(componentName);
    }

    @Override
    public boolean addChild(Component child) {
        return false;
    }

    @Override
    public boolean removeChild(Component child) {
        return false;
    }

    @Override
    public Component getChild(int childIndex) {
        return null;
    }

    @Override
    public void operation() {
        System.out.println("叶子结点："+getComponentName());
    }
}
